package com.zhu.esyblog.controller;

import com.zhu.esyblog.pojo.RespBean;
import com.zhu.esyblog.service.LoginService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "注销")
@RestController
@RequestMapping("logout")
public class Logout {
    @Autowired
    private LoginService loginService;

    @GetMapping
    public RespBean logout(@RequestHeader("Authorization")String token){
        return loginService.logout(token);
    }
}
